<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <title>商品信息</title>
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <link rel="stylesheet" href="../../../component/elementUI/index.css" />
  <link rel="stylesheet" href="../../../style/wangeditor.css" />
  <link rel="stylesheet" href="../../../style/index.css" />
  <style>
    .el-badge__content {
      z-index: 1;
    }

    .el-dialog__header {
      padding: 15px 15px 10px;
    }

    .el-dialog__body {
      padding: 15px;
    }

    .el-dialog__footer {
      padding: 5px 15px 10px;
    }

    #user .el-dialog {
      margin-top: 10px !important;
      margin: 0 auto 10px;
    }

    #user .el-dialog__header {
      padding: 15px 15px 0;
    }

    #user .el-dialog__body {
      padding: 0 15px 0;
    }

    #user .el-input.is-disabled .el-input__inner {
      color: #000;
      background-color: #fff;
    }

    .el-dropdown {
      vertical-align: top;
    }

    .el-dropdown+.el-dropdown {
      margin-left: 15px;
    }

    .el-icon-arrow-down {
      font-size: 12px;
    }
  </style>
</head>

<body>
  <div id="app" v-cloak class="minWidth">
    <el-form :inline="true" :form="form">
      <el-form-item>
        <el-button type="primary" @click="Add">新增</el-button>
      </el-form-item>
      <el-form-item>
        <el-input v-model.trim="form.Article_Name" clearable placeholder="请输入商品名称" />
      </el-form-item>
      <!-- <el-form-item>
        <el-input v-model.trim="form.Supplier_Name" clearable placeholder="请输入供应商名称" />
      </el-form-item>
      <el-form-item>
        <el-select clearable v-model.trim="form.Brand_SerialNumber" placeholder="请选择商品品牌" filterable
          style="width: 100%">
          <el-option v-for="(item,index) in brand" :key="index" :label="item.Brand_Name"
            :value="item.Brand_SerialNumber"></el-option>
        </el-select>
      </el-form-item> -->
      <el-form-item>
        <el-button type="primary" @click="onSerach">查询</el-button>
      </el-form-item>
    </el-form>
    <el-table :data="tableData" stripe border height="calc(100vh - 140px)" style="width: 100%"
      @selection-change="handleSelectionChange">
      <el-table-column align="center" type="index" label="序号" width="50"></el-table-column>
      <el-table-column prop="Article_SerialNumber" label="商品编号"></el-table-column>
      <el-table-column prop="Article_Specifications_SerialNumber" label="商品规格编号"></el-table-column>

      <el-table-column prop="Picture_URL" width="140" align="center" label="商品规格图">
        <template v-slot="{row}">
          <el-image fit="contain" :src="IMGlj + row.Picture_URL" :preview-src-list="[IMGlj + row.Picture_URL]"
            style="width: 100px; height: 100px"></el-image>
        </template>
      </el-table-column>
      <el-table-column prop="Specifications_Name" label="商品规格名称"></el-table-column>
      <el-table-column prop="Unit_Price" label="SKU单价">
        <template slot-scope="scope">
          {{ scope.row.Unit_Price + '/' + '元' }}
          <!-- 假设单位是“件”，可按需修改 -->
        </template></el-table-column>
      <el-table-column prop="SKU_Quantity" label="包装中件数">
        <template slot-scope="scope">
          {{ scope.row.SKU_Quantity + '/' + scope.row.Size }}
          <!-- 假设单位是“件”，可按需修改 -->
        </template></el-table-column>
      <el-table-column prop="Start_number" label="起批量"><template slot-scope="scope">
          {{ scope.row.Start_number + '/' + scope.row.Size }}
          <!-- 假设单位是“件”，可按需修改 -->
        </template>
      </el-table-column>
      <el-table-column prop="Refusal_Reason" label="未通过理由">
        <template slot-scope="scope">
          {{ scope.row.Refusal_Reason ? scope.row.Refusal_Reason : '-' }}
          <!-- 假设单位是“件”，可按需修改 -->
        </template></el-table-column>
      <el-table-column prop="Row_Status" label="审核状态" width="100"
        :filters="[{ text: '未审核', value: '0' }, { text: '已审核', value: '01' },{ text: '已拒绝', value: '88' },{ text: '已上架', value: '1' }]"
        :filter-method="filterTag" filter-placement="bottom-end">
        <template slot-scope="scope">
          <el-tag :type="scope.row.Row_Status === '01' ? 'success' : 
        scope.row.Row_Status === '88' ? 'danger' : 
        scope.row.Row_Status === '1' ? 'warning' : 'info'" disable-transitions>
            {{ scope.row.Row_Status === "0" ? '未审核' : scope.row.Row_Status
            === "88" ? '已拒绝' : scope.row.Row_Status === "01" ? '已审核':scope.row.Row_Status === '1'?
            '已上架':'' }}
          </el-tag>
        </template>
      </el-table-column>
      <el-table-column label="操作" width="150">
        <template slot-scope="scope">
          <el-button size="mini" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
          <el-button size="mini" type="danger" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
        </template>
      </el-table-column>
    </el-table>
    <el-pagination style="margin-top: 5px" background @size-change="handleSizeChange"
      @current-change="handleCurrentChange" :current-page="form.page" :page-sizes="[10, 20, 30, 50]"
      :page-size="form.limit" layout="total, sizes, prev, pager, next, jumper" :total="Total">
    </el-pagination>
    <show-detail :visible.sync="dialogVisible" :data="Article_SerialNumber"></show-detail>
  </div>
  <script type="text/javascript" src="../../../utils/wangeditor.js"></script>
  <script type="text/javascript" src="../../../utils/jquery.min.js"></script>
  <script type="text/javascript" src="../../../utils/jquery.cookie.js"></script>
  <script type="text/javascript" src="../../../utils/vue.min.js"></script>
  <script type="text/javascript" src="../../../utils/vuex.min.js"></script>
  <script type="text/javascript" src="../../../component/elementUI/index.js"></script>
  <script type="text/javascript" src="../../../component/component.js"></script>
  <script type="text/javascript" src="../../../config/config.js"></script>
  <script type="text/javascript" src="../../../utils/FileSaver.min.js"></script>
  <script type="text/javascript" src="../../../utils/FileSaver.js"></script>
  <script type="text/javascript" src="../../../utils/xlsx.full.min.js"></script>
  <script type="text/javascript" src="../../../utils/xlsx.core.min.js"></script>
  <script type="text/javascript" src="../../../utils/compressor.js"></script>
  <script type="text/javascript" src="../../../utils/ID_Validity.js"></script>
  <script type="text/javascript" src="../../../utils/utils.js"></script>
  <script type="text/javascript" src="js/index.js"></script>
</body>

</html>